package com.ideal.lx_mss.service.impl;

import com.ideal.lx_mss.service.CgService;
import com.ideal.lx_mss.service.DataService;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashSet;
import java.util.List;
import java.util.Map;

@Service
public class DataServiceImpl implements DataService {

    @Autowired
    private CgService cgService;  //采购服务


    /**
     * 数据分发控制器
     * @param topic 主题
     * @param rcList 增量对账单
     * @param fclList 全量对账
     * @param ddlList  字典
     * @param dataList 数据
     * @param exceptionList 异常数据
     */
    @Override
    public void dataConstructor(String topic, List<JSONObject> rcList, List<JSONObject> fclList, List<JSONObject> ddlList, List<JSONObject> dataList, List<String> exceptionList, HashSet<String> tableNames) {
        //采购服务
        if ("tp_dat_da_mss_LX_ZYGS_CG_Inc_Data".equals(topic)||"tp_dat_da_mss_LX_ZYGS_CG_Retransmission_Data".equals(topic)){
            cgService.cgDataServe(topic,rcList,fclList,ddlList,dataList,exceptionList,tableNames);



        }
    }
}
